package cn.edu.scau.cmi.wuzhenxin.client;

import cn.edu.scau.cmi.wuzhenxin.domain.Insure;
import cn.edu.scau.cmi.wuzhenxin.simpleFactory.SimpleFactory;
import javafx.fxml.FXML;

import javafx.scene.control.Button;

import javafx.scene.control.TextArea;

import javafx.scene.control.ChoiceBox;

public class MyController1 {
	@FXML
	private Button showbt;
	@FXML	
	private ChoiceBox name;
	@FXML
	private TextArea detilText;

	private SimpleFactory factory = new SimpleFactory();
	
	public void eventButton() {
		String value = (String)name.getValue();
		Insure insure = factory.getInstance(value);
		detilText.setText(insure.showMessage());
	}
}